Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[zh-cn]: auto-fix links #25036

Merged
merged 3 commits into from
Dec 13, 2024
Merged

[zh-cn]: auto-fix links #25036

merged 3 commits into from
Dec 13, 2024

Conversation

argl
Copy link
Contributor

@argl argl commented Dec 12, 2024

Description

This fixes plain markdown links to point to the actual destination without going through the whole redirect stack.
(MP-1798)

Motivation

To continue our transition to rari, we have to weed out any links in documentation that rely on "fundamental redirects". Fundamental redirects (as opposed to our main redirect map) are only there to support requests coming in from really outdated links on the internet.

Additional details

Luckily, yari already has tooling around fixing those links, so this is basically a version of translated content with the fix-flaws/broken-links tooling applied. The result looks very good, and even shows improvements on linking less often to the en-US content when there is a translated version of the page available.

Using the rari diff tool, I have attached a HTML file that highlights all differences before/after the change on the simplified HTML rendering of the content.
Diffs.zip

@github-actions github-actions bot added the l10n-zh Issues related to Chinese content. label Dec 12, 2024
Copy link
Contributor

github-actions bot commented Dec 12, 2024

Preview URLs (300 pages)
Flaws (3249)

Note! 37 documents with no flaws that don't need to be listed. 🎉

URL: /zh-CN/docs/Learn
Title: 学习 Web 开发
Flaw count: 15

  • macros:
    • /zh-CN/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_interactivity_events_state does not exist but fell back to /en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_interactivity_events_state
    • /zh-CN/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_interactivity_filtering_conditional_rendering does not exist but fell back to /en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_interactivity_filtering_conditional_rendering
    • /zh-CN/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_accessibility does not exist but fell back to /en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_accessibility
    • /zh-CN/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_resources does not exist but fell back to /en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_resources
    • /zh-CN/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/Ember_getting_started does not exist but fell back to /en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/Ember_getting_started
    • and 10 more flaws omitted

URL: /zh-CN/docs/Learn/Accessibility/HTML
Title: HTML:无障碍的良好基础
Flaw count: 15

  • macros:
    • /zh-CN/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_interactivity_events_state does not exist but fell back to /en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_interactivity_events_state
    • /zh-CN/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_interactivity_filtering_conditional_rendering does not exist but fell back to /en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_interactivity_filtering_conditional_rendering
    • /zh-CN/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_accessibility does not exist but fell back to /en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_accessibility
    • /zh-CN/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_resources does not exist but fell back to /en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_resources
    • /zh-CN/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/Ember_getting_started does not exist but fell back to /en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/Ember_getting_started
    • and 10 more flaws omitted

URL: /zh-CN/docs/Learn/Accessibility/Multimedia
Title: 多媒体无障碍
Flaw count: 15

  • macros:
    • /zh-CN/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_interactivity_events_state does not exist but fell back to /en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_interactivity_events_state
    • /zh-CN/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_interactivity_filtering_conditional_rendering does not exist but fell back to /en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_interactivity_filtering_conditional_rendering
    • /zh-CN/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_accessibility does not exist but fell back to /en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_accessibility
    • /zh-CN/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_resources does not exist but fell back to /en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_resources
    • /zh-CN/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/Ember_getting_started does not exist but fell back to /en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/Ember_getting_started
    • and 10 more flaws omitted

URL: /zh-CN/docs/Learn/Accessibility/What_is_accessibility
Title: 什么是无障碍?
Flaw count: 16

  • macros:
    • /zh-CN/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_interactivity_events_state does not exist but fell back to /en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_interactivity_events_state
    • /zh-CN/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_interactivity_filtering_conditional_rendering does not exist but fell back to /en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_interactivity_filtering_conditional_rendering
    • /zh-CN/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_accessibility does not exist but fell back to /en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_accessibility
    • /zh-CN/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_resources does not exist but fell back to /en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_resources
    • /zh-CN/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/Ember_getting_started does not exist but fell back to /en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/Ember_getting_started
    • and 10 more flaws omitted
  • broken_links:
    • Link points to the page it's already on

URL: /zh-CN/docs/Learn/Accessibility/WAI-ARIA_basics
Title: WAI-ARIA 基础
Flaw count: 16

  • macros:
    • /zh-CN/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_interactivity_events_state does not exist but fell back to /en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_interactivity_events_state
    • /zh-CN/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_interactivity_filtering_conditional_rendering does not exist but fell back to /en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_interactivity_filtering_conditional_rendering
    • /zh-CN/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_accessibility does not exist but fell back to /en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_accessibility
    • /zh-CN/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_resources does not exist but fell back to /en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_resources
    • /zh-CN/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/Ember_getting_started does not exist but fell back to /en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/Ember_getting_started
    • and 10 more flaws omitted
  • broken_links:
    • Can't resolve /zh-CN/docs/Learn/Accessibility/

URL: /zh-CN/docs/Learn/Accessibility/CSS_and_JavaScript
Title: CSS 和 JavaScript 无障碍最佳实践
Flaw count: 15

  • macros:
    • /zh-CN/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_interactivity_events_state does not exist but fell back to /en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_interactivity_events_state
    • /zh-CN/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_interactivity_filtering_conditional_rendering does not exist but fell back to /en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_interactivity_filtering_conditional_rendering
    • /zh-CN/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_accessibility does not exist but fell back to /en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_accessibility
    • /zh-CN/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_resources does not exist but fell back to /en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_resources
    • /zh-CN/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/Ember_getting_started does not exist but fell back to /en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/Ember_getting_started
    • and 10 more flaws omitted

URL: /zh-CN/docs/Learn/Forms
Title: Web 表单构建块
Flaw count: 15

  • macros:
    • /zh-CN/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_interactivity_events_state does not exist but fell back to /en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_interactivity_events_state
    • /zh-CN/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_interactivity_filtering_conditional_rendering does not exist but fell back to /en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_interactivity_filtering_conditional_rendering
    • /zh-CN/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_accessibility does not exist but fell back to /en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_accessibility
    • /zh-CN/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_resources does not exist but fell back to /en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_resources
    • /zh-CN/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/Ember_getting_started does not exist but fell back to /en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/Ember_getting_started
    • and 10 more flaws omitted

URL: /zh-CN/docs/Learn/Forms/Other_form_controls
Title: 其他表单控件
Flaw count: 18

  • macros:
    • /zh-CN/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_interactivity_events_state does not exist but fell back to /en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_interactivity_events_state
    • /zh-CN/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_interactivity_filtering_conditional_rendering does not exist but fell back to /en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_interactivity_filtering_conditional_rendering
    • /zh-CN/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_accessibility does not exist but fell back to /en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_accessibility
    • /zh-CN/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_resources does not exist but fell back to /en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_resources
    • /zh-CN/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/Ember_getting_started does not exist but fell back to /en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/Ember_getting_started
    • and 10 more flaws omitted
  • images:
    • File not present on disk, an empty file, or not an image
    • File not present on disk, an empty file, or not an image
  • translation_differences:
    • Differences in the important macros (1 in common of 16 possible)

URL: /zh-CN/docs/Learn/Forms/Basic_native_form_controls
Title: 原生表单部件
Flaw count: 18

  • macros:
    • /zh-CN/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_interactivity_events_state does not exist but fell back to /en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_interactivity_events_state
    • /zh-CN/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_interactivity_filtering_conditional_rendering does not exist but fell back to /en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_interactivity_filtering_conditional_rendering
    • /zh-CN/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_accessibility does not exist but fell back to /en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_accessibility
    • /zh-CN/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_resources does not exist but fell back to /en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_resources
    • /zh-CN/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/Ember_getting_started does not exist but fell back to /en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/Ember_getting_started
    • and 10 more flaws omitted
  • broken_links:
    • Can't resolve /zh-CN/docs/Web/HTML/Element/Input#name
    • Can't resolve /zh-CN/docs/Web/HTML/Element/Input#value
  • translation_differences:
    • Differences in the important macros (1 in common of 2 possible)

URL: /zh-CN/docs/Learn/Forms/Your_first_form
Title: 创建我的第一个表单
Flaw count: 16

  • macros:
    • /zh-CN/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_interactivity_events_state does not exist but fell back to /en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_interactivity_events_state
    • /zh-CN/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_interactivity_filtering_conditional_rendering does not exist but fell back to /en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_interactivity_filtering_conditional_rendering
    • /zh-CN/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_accessibility does not exist but fell back to /en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_accessibility
    • /zh-CN/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_resources does not exist but fell back to /en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_resources
    • /zh-CN/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/Ember_getting_started does not exist but fell back to /en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/Ember_getting_started
    • and 10 more flaws omitted
  • translation_differences:
    • Differences in the important macros (1 in common of 3 possible)

URL: /zh-CN/docs/Learn/Forms/Form_validation
Title: 表单数据校验
Flaw count: 17

  • macros:
    • /zh-CN/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_interactivity_events_state does not exist but fell back to /en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_interactivity_events_state
    • /zh-CN/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_interactivity_filtering_conditional_rendering does not exist but fell back to /en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_interactivity_filtering_conditional_rendering
    • /zh-CN/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_accessibility does not exist but fell back to /en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_accessibility
    • /zh-CN/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_resources does not exist but fell back to /en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_resources
    • /zh-CN/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/Ember_getting_started does not exist but fell back to /en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/Ember_getting_started
    • and 10 more flaws omitted
  • broken_links:
    • Can't resolve /zh-CN/docs/HTML/HTML5
  • translation_differences:
    • Differences in the important macros (1 in common of 17 possible)

URL: /zh-CN/docs/Learn/Forms/HTML_forms_in_legacy_browsers
Title: 旧式浏览器中的 HTML 表单
Flaw count: 17

  • macros:
    • /zh-CN/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_interactivity_events_state does not exist but fell back to /en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_interactivity_events_state
    • /zh-CN/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_interactivity_filtering_conditional_rendering does not exist but fell back to /en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_interactivity_filtering_conditional_rendering
    • `/zh-CN/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_a…

TRUNCATED!

@argl argl marked this pull request as ready for review December 13, 2024 10:01
@argl argl requested a review from a team as a code owner December 13, 2024 10:01
@argl argl requested review from yin1999 and removed request for a team December 13, 2024 10:01
Copy link
Member

@yin1999 yin1999 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @argl 👍

@yin1999 yin1999 merged commit dc6649b into main Dec 13, 2024
8 checks passed
@yin1999 yin1999 deleted the MP-1798-link-fixes-zh-cn branch December 13, 2024 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
l10n-zh Issues related to Chinese content.
Projects
Development

Successfully merging this pull request may close these issues.

2 participants